﻿<%@ Page Language="C#" Title="Planning" MasterPageFile="~/UI/Masters/Content.master" AutoEventWireup="true" Inherits="Codeblack.TfsScrumboard.UI.Pages.PlanningPage,Codeblack.TfsScrumBoard" %>
<%@ Register Src="~/UI/Controls/Scrumboard/Search.ascx" TagName="Search" TagPrefix="scrum" %>
<%@ Register Src="~/UI/Controls/Scrumboard/Backlogs.ascx" TagName="Backlogs" TagPrefix="scrum" %>
<%@ Import Namespace="Codeblack.TfsScrumboard" %>

<asp:Content ID="c" runat="server" ContentPlaceHolderID="c">

    <div id="scrumboard-middle">
        <div id="leftSide">
            <div align="center">
                <scrum:search runat="server" id="search" enableviewstate="false" />
                <scrum:backlogs runat="server" id="backlogs" enableviewstate="false" />
                <div id="leftSide-filler"></div>
            </div>
        </div>

        <div id="splitHandle" ></div>

        <div id="scrumboard-container">
            <div id="planning-caption">
                <span></span>
            </div>
            
            <div id="planning-workitems-info"></div>

            <table id="planning-workitems">
                <thead>
                    <tr>
                        <th class="item">&nbsp;</th>
                        <th class="id">ID</th>
                        <th class="title">Title</th>
                        <th class="story-points">Story Points</th>
                        <th class="iteration-path">Backlog</th>
                        <th class="status">Status</th>
                        <th class="assigned-to">Assigned To</th>
                    </tr>
                </thead>
                <tbody />
            </table>
        </div>
    </div>

    <script type="text/javascript">
        $(document).ready(function () {
            Scrumboard.initPlanningPage(<%= JsonSerializer.Serialize(this.Model) %>);
        });
    </script>

    <!--====== Templates ======-->
    <script id="workitemTemplate" type="text/x-jquery-tmpl">
        <tr workItemId="{{=ID}}">
            <td class="item">
                <div class="expand"></div>
                <span id="icon" class="icon" style="background-image: url({{=WorkItemTypeImageUrl}})"></span>
            </td>
            <td class="id">{{=ID}}</td>
            <td class="title"><div>{{=Title}}</div></td>
            <td class="story-points">{{=StoryPoints}}</td>
            <td class="iteration-path">{{=IterationPath}}</td>
            <td class="status">{{=Status}}</td>
            <td class="assigned-to">{{=AssignedTo}}</td>
        </tr>
    </script>
    <script id="infoTemplate" type="text/x-jquery-tmpl">
        Query Results: {{=TotalWorkItems}} results found ({{=TotalStoryPoints}} story points).
    </script>

</asp:Content>

